﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace ABCTile.Models
{
    public class Project
    {
        [Key]
        public int ProjectID { get; set; }
        [Required(ErrorMessage = "Project Name is required")]
        [Display(Name = "Project Name")]
        [MaxLength(20, ErrorMessage = "Project Name cannot be longer than 20 Characters")]
        public string projectName { get; set; }
        [Required]
        [Display(Name = "Street address of project")]
        [MaxLength(30, ErrorMessage = "Street Name cannot be longer than 30 Characters")]
        public string streetAddress { get; set; }
        [Required]
        [Display(Name = "City")]
        [MaxLength(20, ErrorMessage = "City Name cannot be longer than 20 Characters")]
        public string city { get; set; }
        [Required]
        [Display(Name = "State")]
        public string state { get; set; }
        [Required]
        [RegularExpression("^[0-9]{5}", ErrorMessage = "Zip Code must be 5 numbers long")]
        [Display(Name = "Zip Code")]
        public int zip { get; set; }
        [Required]
        [Display(Name = "Date of Bidding")]
        public DateTime bid_date { get; set; }
        [Required]
        [Display(Name = "Type of Building")]
        [MaxLength(20, ErrorMessage = "Building Type cannot be longer than 20 Characters")]
        public string building_type { get; set; }
        [Required]
        [Display(Name = "Type of work")]
        [MaxLength(20, ErrorMessage = "Work Type cannot be longer than 20 Characters")]
        public string work_type { get; set; }
        [Required]
        [Display(Name = "ID of Architect")]
        [Range(1, 99999)]
        public int architectureID { get; set; }
        [Required]
        [Display(Name = "ID of owner")]
        [Range(1, 99999)]
        public int ownerID { get; set; }
        [Required]
        [Display(Name = "What type of submission")]
        [MaxLength(20, ErrorMessage = "Submission Type cannot be longer than 20 Characters")]
        public string bid_submit_type { get; set; }

        [Display(Name = "Comment on the project")]
        [MaxLength(200, ErrorMessage = "Comment cannot be longer than 200 Characters")]
        public string comment { get; set; }

        public int StatusID { get; set; }

        public virtual Status Status { get; set; }

    }
}